import axios from './http'
/** 
 * 资讯模块
 */
export const _getNewsType = (config) => axios.get('/pc/news/type', config); // 获取新闻类别

export const _getNewsList = (fromData, config) => axios.get('/pc/news/list', { params: fromData }); //  获取新闻类别下的数据列表

export const _getNewsDetail = (id, config) => axios.get('/pc/news/' + id, config); // 获取新闻详情页


export const _getcjrz = (config) => axios.get('/pc/finance', { params: config }); // 行情商品分类列表
/** 
 * 行情商品模块
 */
export const _getSymbolTypeList = (config) => axios.get('/pc/goods_type/lists', config); // 行情商品分类列表

export const _getSymbolList = (uid, config) => axios.get('/pc/goods_type/lists_goods?uid=' + uid, config); // 获取所有分类商品

export const _getSymbolDetail = (symbolId, config) => axios.get('/pc/goods/details/' + symbolId, config); // 获取商品的详情

export const _getUserSymbolList = (uid, config) => axios.get('/pc/goods_chose/lists/' + uid, config); // 获取用户自选商品

export const _addSymbolToUser = (uid, symbolId, config) => axios.get('/pc/goods_chose/add?uid=' + uid + '&goods_id=' + symbolId, config); // 增加自选商品

export const _deleteSymbolFromUser = (uid, symbolId, config) => axios.get('/pc/goods_chose/chancel?uid=' + uid + '&goods_id=' + symbolId, config); // 取消自选商品

export const _getDefaultSymbolList = (config) => axios.get('/pc/no/default_goods_list', config); // 获取推荐商品列表

export const _getGoodsOpen = (symbolId) => axios.get('/pc/goods/is_open?goods_id=' + symbolId); // 获取商品是否开盘

export const _getSymbolSelf = (uid, goods_id, config) => axios.get('/pc/goods_chose/choose_goods_status?goods_id=' + uid + '&goods_id=' + goods_id, config); // 获取推荐商品列表
/** 
 * 登录 注册模块
 */
export const _hadRegister = (formdata, config) => axios.post('/pc/is_moblie', formdata, config); // 检测手机号码是否注册

export const _sendImgCode = (config) => axios.get('/pc/graphic_code?t=' + Math.random(), config); // 发送图形验证码

export const _validateImgCode = (formdata, config) => axios.post('/pc/get_code', formdata, config); // 图形验证码验证

export const _sendMessage = (formdata, config) => axios.post('/pc/reginster', formdata, config); // 发送短信

export const _register = (formdata, config) => axios.post('/pc/submit_reqister', formdata, config); // 注册会员

export const _login = (formdata, config) => axios.post('/pc/login', formdata, config); // 用户登录 

export const _forget = (formdata, config) => axios.post('/pc/forget_login_password', formdata, config); // 忘记密码

export const _changeLPW = (formdata, config) => axios.post('/pc/update_login_password', formdata, config); // 修改登录 密码

export const _loginOut = (formdata, config) => axios.post('/pc/out', formdata, config); // 用户登录 

/**
 * 用户信息模块
 */

export const _getUserInfo = (formdata, config) => axios.post('/pc/user_info', formdata, config); // 获取用户信息

export const _getUserTypeInfo = (formdata, config) => axios.post('/pc/my_information', formdata, config); // 获取真假用户的资料

export const _hadSetBundPw = (user_type, config) => axios.get('/pc/is_fund_password?user_type=' + user_type, config); // 用户是否设置资金密码

export const _setBundPw = (formdata, config) => axios.post('/pc/set_fund_password', formdata, config); // 设置资金密码

export const _changeBundPw = (formdata, config) => axios.post('/pc/update_fund_password', formdata, config); // 修改资金密码

export const _changeAvatarNickName = (formdata, config) => axios.post('/pc/update_nick_head', formdata, config); // 修改昵称头像

/**
 * 交易模块
 */
export const _submitOrder = (formdata, config) => axios.post('/pc/order/add', formdata, config); // 提交订单

export const _getcyOrder = (formdata) => axios.get('/pc/order/order_lists', { params: formdata }); // 获取持有订单列表

export const _getgzOrder = (formdata) => axios.get('/pc/order/order_cron_lists', { params: formdata }); // 获取挂有订单列表

export const _getjyOrder = (formdata) => axios.get('/pc/order/order_history_list', { params: formdata }); // 获取订单交易列表

export const _getcxOrder = (formdata) => axios.get('/pc/order/stop_order', { params: formdata }); // 撤单

export const _closeOut = (formdata, btn) => axios.get('/pc/order/order_finish', { params: formdata, btn }, ); // 平仓

export const _setzyzs = (formdata) => axios.get('/pc/order/stop_profit_loss', { params: formdata }); // 设置止盈止损


/**
 * 我的模块
 */
export const _getPNoticeList = (page, pagesize, config) => axios.get('/pc/platform_notice?page=' + page + '&pagesize=' + pagesize, config); // 平台公告

export const _getConf = (conf, config) => axios.get('/pc/conf?conf=' + conf, config); // 获取关于我们,客服电话，注册协议，客服微信，APP版本号，APP更新包下载地址

export const _getHelpTypeList = (config) => axios.get('/pc/help_type?page=1&pagesize=10', config); // 获取帮助中心类型

export const _getHelpList = (type_id, page, pagesize, config) => axios.get('/pc/help_center?type_id=' + type_id + '&page=' + page + '&pagesize=' + pagesize, config); // 获取帮助中心内容列表

export const _getHostList = (page, pagesize, config) => axios.get('/pc/hot_issues?page=' + page + '&pagesize=' + pagesize, config); // 获取帮助中心热门列表

export const _getzjls = (formdata) => axios.get('/pc/user_funds_stream', { params: formdata }); // 资金流水

export const _getUserMoney = (formdata) => axios.get('/pc/get_money', { params: formdata }); // 获取用户资金 保证金 总资产 可用余额

export const _getProConf = (conf) => axios.get('/pc/conf?conf=' + conf); // 风险提示、隐私条款、免责声明

/**
 * 提现
 */
export const _getWithdrawMoneyList = (config) => axios.get('/pc/out_money_list', config); // 提现金额列表

export const _getWithdrawRecords = (page, pagesize, config) => axios.get('/pc/out_money_order?page=' + page + '&pagesize=' + pagesize, config); // 提现记录列表

export const _getCanWithdrawMoney = (config) => axios.get('/pc/is_out_money', config); // 可提现金额

export const _submitWithdraw = (formdata, config) => axios.post('/pc/out_money', formdata, config); // 提现申请

export const _getWithdrawRate = (formdata) => axios.get('/pc/recharge/usd_cnh/out', { params: formdata }); // 提现汇率
/**
 * 缓存
 */
export const _getCacheVersion = (config) => axios.get('/pc/get_cache', config); // 获取缓存版本号

/**
 * 充值
 */
export const _getRechargeMoneyList = (config) => axios.get('/pc/recharge/money_list', config); // 获取充值金额列表

export const _recharge = (money, type_id, config) => axios.get('/pc/recharge/add?money=' + money + '&type_id=' + type_id, config); // 充值

export const _getRechargeMethodList = (config) => axios.get('/pc/recharge/type_list', config); // 充值方式列表

export const _queryOrder = (orderid, config) => axios.get('/pc/recharge/query?order_id=' + orderid, config); // 查询订单

export const _cancelOrder = (orderid, config) => axios.get('/pc/recharge/cancel?order_id=' + orderid, config); // 取消订单

export const _getRechargeRecords = (formdata, config) => axios.get('/pc/recharge/recharge_order', { params: formdata }, config); // 充值记录

export const _getUserMoneyArea = (formdata, config) => axios.get('/pc/recharge/limits', { params: formdata }, config); // 自定义金额范围

export const _userConfirm = (formdata, config) => axios.get('/pc/recharge/confirm', { params: formdata }, config); // 用户确认支付

export const _getSeverTime = (config) => axios.get('/pc/recharge/gettime', config); // 获取系统时间戳

export const _usdt_type_list = (config) => axios.get('/pc/recharge/usdt_type_list', config); // 获取充值列表

export const _usdt_add = (formdata) => axios.get('/pc/recharge/usdt_add', { params: formdata }); // usdt充值

export const _getRate = (formdata) => axios.get('/pc/recharge/usd_cnh', { params: formdata }); // 汇率

/**
 * 股票
 */
export const _getTickeList = (formdata) => axios.get('/pc/stock/list', { params: formdata }); // 获取股票列表

export const _getTickePriceByList = (list) => axios.get('/pc/xlagent/list=' + list); // 获取股票价格和涨跌幅

export const _getUserTickeList = (formdata) => axios.get('/pc/stock/get_stock_chose', { params: formdata }); // 股票自选列表

export const _addUserTicke = (formdata) => axios.get('/pc/stock/add', { params: formdata }); // 添加股票到自选

export const _deleteUserTicke = (formdata) => axios.get('/pc/stock/chancel', { params: formdata }); // 从自选中删除股票

export const _ByListSearch = (formdata) => axios.get('/pc/stock/search', { params: formdata }); // 股票搜索


/**
 * 银行卡
 */

export const _addBankCard = (formdata, config) => axios.post('/pc/bank/add', formdata, config); // 添加银行卡

export const _getBankCardList = (formdata) => axios.get('/pc/bank/list', { params: formdata }); // 获取银行卡列表

export const _delBankCard = (formdata, config) => axios.post('/pc/bank/delete', formdata, config); // 删除银行卡


export const _getLoginHistory = (formdata) => axios.get('/pc/login/history', { params: formdata }); // 获取银行卡列表